package com.bestv.search.common.service;

import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.SearchKeywordHistory;
import com.bestv.search.common.model.TopNCache;

import java.util.Date;
import java.util.List;

/**
 * @author Justin Luo
 */
public interface SearchKeywordHistoryManager {

    void saveOrUpdateSearchKeywordHistory(DataSourceKey key, SearchKeywordHistory[] historyArray);

    Date getMaxDate(DataSourceKey key);

    List<String[]> getSearchKeywordHistoryByKeyword(DataSourceKey key, String keyword, Date startDate, Date endDate,
                                                    String type);

    List<TopNCache> getKeywordTopNCache(DataSourceKey key, String type);

    void deleteHistroyByKeyword(DataSourceKey key, String keyword);
}